﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MedicareBusiness;

namespace MedicareWebUI
{
    public partial class EMTManagement : System.Web.UI.Page
    {

        int selectedEventId;
        EMTBO emts = new EMTBO();
        EventBO events = new EventBO(); 

        protected void Page_Load(object sender, EventArgs e)
        {
            lblOutcome.Visible = false; 
        }

        protected void GridEvents_SelectedIndexChanged(object sender, EventArgs e)
        {
            selectedEventId = (int)gridEvents.SelectedDataKey.Value;
            lblInsertID.Text = Convert.ToString(gridEvents.SelectedDataKey.Value);
        }

        protected void btnEMT_Click(object sender, EventArgs e)
        {
            events.markAsDone((int)gridEvents.SelectedDataKey.Value);
            gridEvents.DataBind();
            gridEvents2.DataBind();
            lblOutcome.Visible = true; 
        }

        protected void btnPatient_Click(object sender, EventArgs e)
        {
            Response.Redirect("PatientManagement.aspx");
        }

        protected void btnEvent_Click(object sender, EventArgs e)
        {
            Response.Redirect("EventManagement.aspx");
        }

   }
}